import request from "../utils/request";

// 用户列表请求接口
export const userList = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/index", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//钱包充值接口
export const recharge = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/recharge", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//交易记录接口
export const trading = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/trading", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//分润记录接口
export const profit = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/profit", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//交易审核接口
export const examine = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/examine", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//订单列表接口
export const orderList = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/order_list", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//发货接口
export const hair = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/hair", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
//退款审核接口
export const refund = (data?: any) => {
  return new Promise(resolve => {
    request({
      //请求轮播列表
      url: "/pcapi/user/refund", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
